﻿@using Newtouch.Infrastructure;
@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script src="@SiteUrl.GetStaticResourceScriptUrl("~/js/validate/jquery.validate.min.js")"></script>
<form id="form1">
    <div style="padding-top: 20px; margin-right: 55px;">
        <table class="form">
            <tr>
                <th class="formTitle"><span class="required">*</span>套餐类型：</th>
                <td class="formValue formDdlSelectorTd">
                  <select id="mblx" class="form-control required" ></select>
                </td>
            </tr>
            <tr>
                <th class="formTitle"><span class="required">*</span>套餐名称：</th>
                <td class="formValue">
                    <input type="text" id="mbmc" class="form-control required" placeholder="" />
                </td>
            </tr>
        </table>
    </div>
</form>
<script>
//valid的扩展样式
    var valOptions = {
        errorPlacement: function (error, element) {
            element.parents('.formValue').addClass('has-error');
        }
    };

    $("#mblx").bindSelect({
        url: "@Url.Action("GettcfwContainWard")",
    });
    function submitForm() {
        if (!$('#form1').formValid(valOptions)) {
            $.modalAlert("必填信息未完善", 'warning');
            return;
        }
        var obj = new Object();
        obj.mbmc = $('#mbmc').val();
        obj.mblx = $('#mblx').val();
        return obj;
    }</script>


